<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
   <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?> 
  </div>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/report.png" alt="" /> <?php echo $heading_title; ?></h1>
    </div>
    <div class="content">
        <table class="list">
             <thead>
          <tr>
            <td class="left"><?php echo $start_time; ?></td>
            <td class="left"><?php echo $end_time; ?></td>
            <td class="left"><?php echo $B; ?></td>
            <td class="left"><?php echo $Bt; ?></td>
            <td class="left"><?php echo $Rs; ?></td>    
            <td class="left"><?php echo $Rg; ?></td>
            <td class="left"><?php echo $Psliver; ?></td>
            <td class="left"><?php echo $Pgold; ?></td>
          </tr>
        </thead>
        <tbody>
            <tr class="filter">
            <td align="left"><input type="text" name="start_time" value="<?php echo $TD1; ?>" id="date-start" size="14"/></td>
            <td align="left"><input type="text" name="end_time" value="<?php echo $TD2; ?>" id="date-end" size="14"/></td>
            <td align="left"><input type="text" name="B" value="<?php echo $b; ?>" /></td>
            <td align="left"><input type="text" name="Bt" value="<?php echo $bt; ?>" /></td>
            <td align="left"><input type="text" name="Rs" value="<?php echo $rs; ?>" /></td>
            <td align="left"><input type="text" name="Rg" value="<?php echo $rg; ?>" /></td>
            <td align="left"><input type="text" name="Psliver" value="<?php echo $psliver; ?>" /></td>
            <td align="left"><input type="text" name="Pgold" value="<?php echo $pgold; ?>" /></td>              
            </tr>                  
        </tbody>
        </table>
        <!--su kien kich button cap nhap la onclick -->
        <div class="center" style="text-align:center;font-size: 30px;margin: 50px 50px 50px 50px;"><a onclick="update();" class="button">Cập Nhật</a></div>
        <div  style="color:#ff0000;text-align:center; margin: 50px 50px 50px 50px;font-family: TIME_NEW_ROMAN;font-size: 20px"><?php echo $status;?> </div>
    </div>
  </div>
</div>
<!--ham update nay dung de lay du lieu tu o text box ve,o day chuoi url xu ly ve start_time... duoc gui len o day-->
<script type="text/javascript"><!--
function update() {
	url = 'index.php?route=Mart_Crm/Manage_Point&token=<?php echo $token; ?>';
	
	var start_time = $('input[name=\'start_time\']').attr('value');
	
	if (start_time) {
		url += '&start_time=' + encodeURIComponent(start_time);
	}
		
	var end_time = $('input[name=\'end_time\']').attr('value');
	
	if (end_time) {
		url += '&end_time=' + encodeURIComponent(end_time);
	}
        var B = $('input[name=\'B\']').attr('value');
        if (B) {
		url += '&B=' + encodeURIComponent(B);
	}
        var Bt = $('input[name=\'Bt\']').attr('value');
        if (end_time) {
		url += '&Bt=' + encodeURIComponent(Bt);
	}
        var Rs = $('input[name=\'Rs\']').attr('value');
        if (Rs) {
		url += '&Rs=' + encodeURIComponent(Rs);
	}
        var Rg = $('input[name=\'Rg\']').attr('value');
        if (Rg) {
		url += '&Rg=' + encodeURIComponent(Rg);
	}
        var Psliver = $('input[name=\'Psliver\']').attr('value');
        if (Psliver) {
		url += '&Psliver=' + encodeURIComponent(Psliver);
	}
        var Pgold = $('input[name=\'Pgold\']').attr('value');
        if (Pgold) {
		url += '&Pgold=' + encodeURIComponent(Pgold);
	}
				
	location = url;
}
//--></script> 
<script type="text/javascript"><!--
$(document).ready(function() {
	$('#date-start').datepicker({dateFormat: 'dd-mm-yy'});
	
	$('#date-end').datepicker({dateFormat: 'dd-mm-yy'});
});
//--></script> 
<?php echo $footer; ?>